package com.iterative.system.entity;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

/**
 * 角色表
 * @author like
 *
 */
@Entity
@Table(name="user")
@DynamicUpdate @DynamicInsert
public class User extends BaseEntity{
	private static final long serialVersionUID = 8763383595289721160L;
	
	private String loginName;
	private String name;
	private String password;
	private String salt;
	private Date birthday;
	private Short gender;
	private String email;
	private String phone;
	private String icon;
	private Date createDate;
	private String state;
	private String description;
	private Integer loginCount;
	private Timestamp  previousVisit;
	private Timestamp lastVisit;
	private String delFlag;
	
	private String plainPassword;//密码明文
	@Transient
	@JsonIgnore
	public String getPlainPassword() {
		return plainPassword;
	}
	public void setPlainPassword(String plainPassword) {
		this.plainPassword = plainPassword;
	}
	public String getLoginName() {
		return loginName;
	}
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getSalt() {
		return salt;
	}
	public void setSalt(String salt) {
		this.salt = salt;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public Integer getLoginCount() {
		return loginCount;
	}
	public void setLoginCount(Integer loginCount) {
		this.loginCount = loginCount;
	}
	public Timestamp getPreviousVisit() {
		return previousVisit;
	}
	public void setPreviousVisit(Timestamp previousVisit) {
		this.previousVisit = previousVisit;
	}
	public Timestamp getLastVisit() {
		return lastVisit;
	}
	public void setLastVisit(Timestamp lastVisit) {
		this.lastVisit = lastVisit;
	}
	public String getDelFlag() {
		return delFlag;
	}
	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}
	public Short getGender() {
		return gender;
	}
	public void setGender(Short gender) {
		this.gender = gender;
	}
	
	
	

}
